package cn.italkcloud.cph.helper;

import cn.italkcloud.cph.constants.enums.PermViewEnum;
import cn.italkcloud.cph.entity.dto.UserAuthDTO;
import org.junit.Test;

/**
 * @author dominate
 * @since 2025/3/19
 **/
public class UserHelperDebug {

    @Test
    public void loadUser() {
        UserAuthDTO user = UserHelper.prepareUser(1);
        String token = AuthHelper.grantAuth(user);
        user = AuthHelper.parse(token);
        assert !PermViewEnum.getPathList(user.getViewPermIds()).isEmpty();
        assert AuthHelper.isValid(user);
    }
}
